#!/usr/bin/env python
import sha
import sys
import string
import random

def get_pass(pw):
    salt = "".join(random.sample(string.letters, 5))
    return salt + "!" + sha.sha(pw+salt).hexdigest()

if __name__ == "__main__":
    if len(sys.argv) < 2:
        usage()
        sys.exit(2)

    password = sys.argv[1]
    salted_pass = get_pass(password)

    print salted_pass
